- Tutorial 1 (The Hello Bob Script)
By Leon Aiossa  (|guideX|)
  1. From the status window of NexIRC, type: DeclareVariable(lName); Then hit enter. Asuming your typed it correctly, NexIRC should add the following text to the Status window ':. Script Command [DeclareVariable(lName);]', You just declared a variable. Variables are usefull if you wish to hold a number or words in memory until NexIRC is closed or you type ?clear from the status window. If your scripting syntax was incorrect, NexIRC will say something like ':. Unknown Command'.
  2. Type: SetVariableData(lName::$input::Enter Your Name::NexIRC::Bob); Then hit enter.You should be prompted with the $input command for you to enter your name, hit enter to use Bob.
  3. Then Type: MsgBox(Hello ReturnVariable[lName]); Then hit enter.If everything was done proporly, you should have seen a MsgBox which says 'Hello Bob'.
  4. Now that you are done using the 'lName' variable, you should probably clear it from memory. Type ClearVariable(lName);Then Hit Enter.
  5. Now that you have created your first script, you should probably view it to make sure it is typed correctly.Type ?view,then hit enter.The ?view command is good when you are writting small code fragments.
  6. If the script looks good, you should learn how to save it. Type: ?save, then hit enter.
  7. NexIRC will ask you for a filename, do not enter a full path, just a filename. For example, you could type 'hellobob.nirc' or 'mytestscripts\hellobob.nirc', however for now, typehellobob.nirc,Then hit enter.Your script should be in <nexircdir>\data\scripts\hellobob.nirc.
  8. Right click the status window, and click 'Window/Menu Editor'.
  9. In the 'menus' listbox (on the bottom right), you should see a menu called 'ROOT' click that.
  10. Where it says 'Caption' typeHello Bob , where it says 'Command' type RunScriptFile(hellobob.nirc);
  11. Click 'Add' on the right hand side above the 'sub menus' listbox.
  12. Now right click on your status window, and you should see an entry at the bottom called ' Hello Bob', click it. It should prompt you with a Msgbox that says "Script: Hello Bob".
  13. After you have completed this script, you should probably clear it from your status window. Type ?clear then hit enter.